﻿<local:DocumentBase x:Class="WPFExcelReport.FLTABMCO"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:UserControls="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Controls" 
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    FontSize="12"
                   Background="White"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:ImageConverter  x:Key="image"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:QtyColorConverter  x:Key="qtyc"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <CollectionViewSource   x:Key="vwEVLCOST" Source="{Binding Path=ICC_EVLCOST,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABCOST" Source="{Binding Path=ICC_ABCOST,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwEXSTOCK" Source="{Binding Path=ICC_EXSTOCK,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwGABEW" Source="{Binding Path=ICC_MGABEW,Source={StaticResource SetProd}}"/>
        <CollectionViewSource   x:Key="vwABGABEW" Source="{Binding Path=ICC_MGABEWAB,Source={StaticResource SetProd}}" />
    </local:DocumentBase.Resources>
    <TabControl>
        <TabItem Header="{Binding Source={Localization:TranslateExtension Word=总览}}" >
            <DockPanel>
                <StackPanel  >
                    <WrapPanel >
                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=年份}}"></TextBlock>
                        <TextBox FontSize="18" Name="txtYear" VerticalAlignment="Center" Background="AliceBlue">2014</TextBox>
                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=月份}}"></TextBlock>
                        <TextBox FontSize="18" Name="txtMonth" VerticalAlignment="Center" Width="30" Background="AntiqueWhite">05</TextBox>
                        <WrapPanel>
                            <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=计算}}"></TextBlock>
                            <Button  Width="30" Height="30"  Click="btnRefresh_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Refresh.png" />
                                </Button.Background>
                            </Button>
                        </WrapPanel>
                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=仓库}}"></TextBlock>
                        <TextBox FontSize="18" Name="txtLO" VerticalAlignment="Center" Width="30"></TextBox>
                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=产品}}"></TextBlock>
                        <TextBox FontSize="18" Name="txtFART" VerticalAlignment="Center" Width="200"></TextBox>
                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=原料}}"></TextBlock>
                        <TextBox FontSize="18" Name="txtMART" VerticalAlignment="Center" Width="200"></TextBox>
                        <WrapPanel>
                            <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=装载}}"></TextBlock>
                            <Button  Width="30" Height="30"  Click="btnLoad_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Reload.png" />
                                </Button.Background>
                            </Button>
                        </WrapPanel>
                        <Button FontSize="18" Height="30" Width="30" Margin="5,0,0,0" Name="btnPrint" Click="btnPrint_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Print.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="5,0,0,0"  VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=打印}}"></TextBlock>
                        <Button Width="Auto"  FontSize="18"  Margin="10,0,0,0"  HorizontalAlignment="Left" Click="btnFilter_Click"  Content="{Binding Source={Localization:TranslateExtension Word=过滤}}"></Button>
                        <Button Width="Auto"   FontSize="18"  Margin="10,0,0,0" HorizontalAlignment="Left" Click="btnFilterClear_Click" Content="{Binding Source={Localization:TranslateExtension Word=清除}}"></Button>
                    </WrapPanel> 
                    <DataGrid 
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column" 
                        MaxHeight="600"
                FontSize="12"
                IsReadOnly="True"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwEVLCOST}}"  
                x:Name="dlgEVLCOST" 
                Margin="0,1,0,0" 
                >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=LO, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LO}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=FARTDES, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成品}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=原料}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MARTDES, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=描述}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MARTCOM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成份}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MVAR, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=var}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=MFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PMART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=价格}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR00, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=期初}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR00AUF, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=我的期初}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=DMOVE, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=总入库}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=DSTOCK, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=库存差异}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR99, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=期末}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR99AUF, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=我的期末}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR10, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=入库}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TR11, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=出库}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AB13, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=回货}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TAB36, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=总消耗}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AB36, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=损耗}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PTAB36, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=分配比例}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=STOCKCOST, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=VTR10, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=入库价值}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=VTR00, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=期初价值}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=VTR99, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=期末价值}}"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </StackPanel>
            </DockPanel>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:TranslateExtension Word=明细}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="1*"></RowDefinition>
                    <RowDefinition Height="200"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
                    <DataGrid 
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column" 
                        MaxHeight="600"
                        Name="dlgEVLCOSTM"
                FontSize="12"
                IsReadOnly="True"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwEVLCOST}}"  
                Margin="0,1,0,0" 
                >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=LO, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LO}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=FART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成品}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=FARTDES, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=描述}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AB36, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=损耗}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PTAB36}" Header="{Binding Source={Localization:TranslateExtension Word=分配比例}}"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=STOCKCOST, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=成本}}"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </StackPanel>
                <StackPanel Grid.Row="0" Grid.Column="0">
                    <TextBlock  Text="{Binding Source={Localization:TranslateExtension Word=成本}}" ></TextBlock>
                        <Expander>
                            <StackPanel>
                                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=增加：所有入库-非生产出库}}"></TextBlock>
                                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=库存差异：期初库存+增加-期末库存}}"></TextBlock>
                                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=总损耗：所有消耗累计}}"></TextBlock>
                                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=分配比例：消耗/总消耗}}"></TextBlock>
                                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=成本：库存差异*分配比例}}"></TextBlock>
                            </StackPanel>
                        </Expander>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=ID}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=ROWNID, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=月份}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MONTH, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=LO}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=LO, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=成品}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=FART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=描述}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=FARTDES, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=描述}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MARTDES, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=成份}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MARTCOM, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=var}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MVAR, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=色号}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=MFARBE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=价格}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=PMART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期初}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR00, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期初价值}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=VTR00, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期末}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR99, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期末价值}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=VTR99, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=库存差异}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=DSTOCK, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=总损耗}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TAB36, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=增加}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=DMOVE, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=入库}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR10, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=出库}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR11, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=入库价值}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=VTR10, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=消耗}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=AB36, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=分配比例}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=PTAB36, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=成本}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=STOCKCOST, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEVLCOST}}"></TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel Grid.Row="0" Grid.Column="1">
                    <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=按品种}}" ></TextBlock>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=ID}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=ROWNID, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=月份}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MONTH, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=LO}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=LO, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=成品}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=FART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=描述}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=FARTDES, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=var}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=FVAR, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=色号}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=FFARBE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=原料}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=var}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MVAR, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=色号}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MFARBE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=损耗}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=AB36, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=总损耗}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=TAB36, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=分配比例}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=PTAB36,Source={StaticResource ResourceKey=vwABCOST}}"></TextBlock>
                        </Grid>
               
                </StackPanel>
                <StackPanel Grid.Row="0" Grid.Column="2">
                    <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=库存明细}}" ></TextBlock>
                   
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=ID}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=ROWNID, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=月份}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MONTH, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=LO}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=LO, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=纱线}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=描述}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MARTDES, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=成份}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MARTCOM, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=var}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MVAR, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=色号}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=MFARBE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=价格}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=PMART, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期初}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=TR00, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
               
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期末}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=TR99, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
         
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=入库}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR10, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=出库}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=TR11, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=增加}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=DMOVE, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期初价值}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=VTR00, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=期末价值}}"></TextBlock>
                        <TextBlock Grid.Column="1" Text="{Binding Path=VTR99, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                    </Grid>
                    <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=TMCOST}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=TMCOST, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>                
                    <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=入库价值}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=VTR10, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=DPRICE}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=DPRICE, Converter={StaticResource ResourceKey=Trim},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>                      
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                                <ColumnDefinition Width="100"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:TranslateExtension Word=库存差异}}"></TextBlock>
                            <TextBlock Grid.Column="1" Text="{Binding Path=DSTOCK, Converter={StaticResource ResourceKey=d1000},Source={StaticResource ResourceKey=vwEXSTOCK}}"></TextBlock>
                        </Grid>
     
                </StackPanel>
                <TabControl Grid.Row="0" Grid.Column="3" Grid.RowSpan="2">
                    <TabItem Header="{Binding Source={Localization:TranslateExtension Word=移动记录}}" Background="White">
                        <DockPanel >
                            <Grid  >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="1*"/>
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Grid.Column="0">
                                    <WrapPanel>
                                        <TextBlock FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:TranslateExtension Word=查看}}"></TextBlock>
                                        <Button  Width="30" Height="30"  Click="btnLoadGB14_Click">
                                            <Button.Background>
                                                <ImageBrush  ImageSource="Image/Refresh.png" />
                                            </Button.Background>
                                        </Button>

                                        <Button Content="去除分组" Margin="10,2,2,2" Click="UngroupButton_Click" />
                                    <Button Content="按类型组" Margin="2" Click="GroupButton_Click" />
                                </WrapPanel>
                                    <WrapPanel>
                                        <TextBox Name="txtGroup" HorizontalAlignment="Stretch" Background="Wheat" Foreground="Red" Height="Auto"></TextBox>
                                    </WrapPanel>
                                </StackPanel>
                                <StackPanel  Grid.Row="1" Margin="0,0,0,0">
                                    <DataGrid CanUserReorderColumns="True"  
                                      CanUserResizeRows="True" CanUserSortColumns="True"                  
                                      AutoGenerateColumns="False"   
                                      EnableRowVirtualization="True"  
                                              Name="dlgGABEW"
                                      Width="Auto"
                                   MaxHeight="600"
                                      FontSize="12"
                                      RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                      IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                                      ItemsSource="{Binding Source={StaticResource ResourceKey=vwGABEW}}"  
                                      Grid.ColumnSpan="4" Margin="0,1,0,0" >
                                        <DataGrid.GroupStyle>
                                            <!-- Style for groups at top level. -->
                                            <GroupStyle>
                                                <GroupStyle.ContainerStyle>
                                                    <Style TargetType="{x:Type GroupItem}">
                                                        <Setter Property="Margin" Value="0,0,0,5"/>
                                                        <Setter Property="Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="{x:Type GroupItem}">
                                                                    <Expander IsExpanded="True" Background="White" BorderBrush="Black" Foreground="Black" BorderThickness="1,1,1,5">
                                                                        <Expander.Header>
                                                                            <DockPanel>
                                                                                <TextBlock FontWeight="Bold" Text="{Binding Path=GABBS}" Margin="5,0,0,0" Width="100"/>
                                                                                <TextBlock FontWeight="Bold" Text="{Binding Path=SCN}"/>
                                                                                <TextBlock FontWeight="Bold" Text="{Binding Path=GABKG}"/>
                                                                            </DockPanel>
                                                                        </Expander.Header>
                                                                        <Expander.Content>
                                                                            <ItemsPresenter />
                                                                        </Expander.Content>
                                                                    </Expander>
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </GroupStyle.ContainerStyle>
                                            </GroupStyle>
                                            <!-- Style for groups under the top level. -->
                                            <GroupStyle>
                                                <GroupStyle.HeaderTemplate>
                                                    <DataTemplate>
                                                        <DockPanel Background="White">
                                                            <TextBlock Text="{Binding Path=GABBS}" Foreground="Red" Margin="30,0,0,0" Width="100"/>
                                                            <TextBlock Text="{Binding Path=ItemCount}" Foreground="Red"/>
                                                        </DockPanel>
                                                    </DataTemplate>
                                                </GroupStyle.HeaderTemplate>
                                            </GroupStyle>
                                        </DataGrid.GroupStyle>
                                        <DataGrid.Columns>
                                            <DataGridTextColumn Binding="{Binding Path=GABLO, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LO}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABLB, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LB}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=ABPART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成品}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=ABPVAR, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=VAR}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=ABPFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFTYP, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=T}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFKRS, Converter={StaticResource ResourceKey=Trim}}" Header=""  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFLFD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单号}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFPOS, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=行}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABBS, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=方式}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=方式}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABKG, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                                        </DataGrid.Columns>
                                    </DataGrid  >
                                </StackPanel>
                            </Grid>
                        </DockPanel>
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:TranslateExtension Word=生产单}}" Background="White">
                        <DockPanel >
                            <Grid  >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="1*" />
                                    <RowDefinition Height="1*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                </Grid.ColumnDefinitions>
                                <StackPanel  Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"  Grid.ColumnSpan="2" Margin="0,0,0,0">
                                    <DataGrid CanUserReorderColumns="True"  
                                      CanUserResizeRows="True" CanUserSortColumns="True"                  
                                      AutoGenerateColumns="False"   
                                      EnableRowVirtualization="True"  
                                      Width="Auto"
                                      MaxHeight="600"
                                      FontSize="12"
                                      RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                      IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                                      ItemsSource="{Binding Source={StaticResource ResourceKey=vwABGABEW}}"  
                                      Grid.ColumnSpan="4" Margin="0,1,0,0" >
                                        <DataGrid.Columns>
                                            <DataGridTextColumn Binding="{Binding Path=ABPART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=成品}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=ABPVAR, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=VAR}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=ABPFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABLO, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LO}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABLB, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=LB}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=原料}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABVAR, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=VAR}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFTYP, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=T}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFKRS, Converter={StaticResource ResourceKey=Trim}}" Header=""  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFLFD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单号}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABAUFPOS, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=行}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABBS, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=方式}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=方式}}"  Width="Auto" />
                                            <DataGridTextColumn Binding="{Binding Path=GABKG, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                                        </DataGrid.Columns>
                                    </DataGrid  >
                                </StackPanel>
                            </Grid>
                        </DockPanel>
                    </TabItem>
                </TabControl>
            </Grid>         
        </TabItem>
    </TabControl>
   
</local:DocumentBase>